package edu.nf.ch05;

import edu.nf.ch05.entity.User;
import edu.nf.ch05.service.UserService;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author CSY
 * @date 2025 - 04 - 23
 */
public class Main {
    public static void main(String[] args) {
        UserService userService = new UserService();
        /*Map<String,Object> map = new HashMap<>();
        map.put("name","userA");

        List<User> user = userService.listUser(map);
        for (User u : user) {
            System.out.println(u.getName());
        }*/

        /*List<Integer> ids = Arrays.asList(1,2);
        List<User> users = userService.listUsersById(ids);
        for (User user : users) {
            System.out.println(user.getName());
        }*/

        User user = new User();
        user.setId(1);
        user.setName("userB");
        user.setAge(18);
        userService.update(user);


    }
}
